<div class="accordion" id="accordionPanelsStayOpenExample">
{% for device_info in info %}
      <div class="accordion-item">
        <h2 class="accordion-header" id="panelsStayOpen-headingOne">
          <button class="accordion-button" type="button" data-bs-toggle="collapse" data-bs-target="#panelsStayOpen-{{ device_info.device.name }}" aria-expanded="true" aria-controls="panelsStayOpen-collapseOne">
              Найдено на {{ device_info.device.name }}
          </button>
        </h2>

        <div id="#panelsStayOpen-{{ device_info.device.name }}" class="accordion-collapse collapse show" aria-labelledby="panelsStayOpen-headingOne">
          <div class="accordion-body">

                {% for zabbix_data in zabbix %}
                    <div class="fs-5">
                        <a class="badge text-decoration-none text-bg-danger" target="_blank"
                           href="{{ zabbix_url }}/hostinventories.php?hostid={{ zabbix_data.1 }}">
                            {{ zabbix_data.0 }}
                        </a>
                    </div>
                {% endfor %}

            {% for res in device_info.results %}
                <h4 class="fs-5 mt-1">IP - {{ res.ip }}</h4>
                <h4 class="fs-5 mt-1">MAC - {{ res.mac }}</h4>
                <h4 class="fs-5 mt-1">VLAN - {{ res.vlan }}</h4>

                {% if res.device_name %}
                    <h4 class="fs-5 mt-1">Device - {{ res.device_name }}</h4>
                {% endif %}

                {% if res.port %}
                    <h4 class="fs-5 mt-1">{{ res.port }}</h4>
                {% endif %}

            {% endfor %}

          </div>
        </div>
      </div>
{% endfor %}
</div>
